﻿<?php
require_once (HOME . '/include/base/FrontendController.php');
class main extends FrontendController {
	/**
	 * 模型文件
	 */
	private $mod_article;
	
	function __construct() {
		parent::__construct();
		$this->main ();
	}
	function main() {
			$this->mod_article = spClass('m_article');
	} // end construct
	function index() { // 这里是首页
// 		import('library/mysession.php');
// 		session()->write(session_id(),session_encode() );
// 		dump ( session()->read(session_id()) );
// // 		session()->gc(10);
// 		dump ($_SESSION );
// 		session()->start();
// 		dump($_SESSION);

		dump ($_SESSION);
// 		session_destroy();
				$_SESSION['xxx'] = array('xxx' =>'yyy','kzd' => '2568');
// 		$_SESSION['fsd'] = '235'; 
		echo "hello test";
	}
	function showArticle() {
		$articleArray = $this->mod_article->findAll ( '1=1' , 'post_time DESC','article_id,content', '3,5');
		dump($articleArray);
		$this->assign("articleArray", $articleArray);
		
		$this->display("article.html");
	}
}
?>